-
Notifications
You must be signed in to change notification settings - Fork 4
CFM-184_Unix_Cluster_Plugin #469
Open
Ioannis
wants to merge
8
commits into
COmanage:develop
Choose a base branch
from
Ioannis:CFM-184_Unix_Cluster_Plugin
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+7,093
−80
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add the UnixCluster available plugin and the core hooks it needs. UnixCluster plugin (app/availableplugins/UnixCluster): - Schema for unix_clusters, unix_cluster_groups and unix_cluster_accounts, with Identifier Type FKs, an explicit default_group_mode (Existing / Personal Group per Account) and group origin/person_id tracking - Enums: UnixClusterSyncModeEnum, DefaultGroupModeEnum, UnixClusterGroupOriginEnum, UnixShellEnum - UnixClustersTable/Controller: validation, Default Group rules (same CO, must be a mapped Unix Cluster Group), FK protection via hasManyPlugins, derivationSummary() and groupClusters() - UnixClusterGroupsTable/Controller: link CO Groups to a cluster, with uniqueness/same-CO rules, origin handling, and Group Name/GID derived live from the Group's Identifiers - Configuration UI with Account/Group/Default Group sections, warning alerts and a "how values are derived" modal opened from an info alert - Unix Cluster Groups index showing origin, Group Name, GID, member count and provisioning status as plain text - en_US locale strings Core: - ClustersTable::groupClusters() opt-in plugin hook; the CO Group edit/view page shows a read-only Clusters field (new element groupClusters.php) - Clusters/fields.inc adds a tab for a cluster plugin's child model - form/unorderedList.php accepts suffixed pseudo-field keys (e.g. SUBTITLE.account) so a form can have several subtitles - Clusters links in the People "Related Configurations" sidebar and the CO Configuration menu - Widen the column library username from 128 to 256 characters - New field.po string Groups.clusters.desc
UnixCluster plugin (app/availableplugins/UnixCluster): - Add UnixClusterAccountStatusEnum, UnixClusterAccount entity and UnixClusterAccountsTable (username/UID unique per cluster, UID must be a positive integer, new accounts default to Active and take the cluster's shell and sync mode, calculateGecos(), calculateHomeDirectory()) - UnixClustersTable::assign(): create one account per Person, in a transaction. Existing mode checks the Default Group (set, mapped, Person is a member). Personal mode finds or creates the personal group (Group Name/GID Identifiers, member and owner via the Owners Group, Personal mapping, GID collision check) and provisions it after commit - Record account creation in the Person's history - Protect Groups used as an account's Primary Group, and remove accounts along with their Person (hasManyPlugins) - Placeholder status(), marshalProvisioningData() and manage action that return "This functionality is not implemented yet" - Move the derivation summary into DerivationSummaryTrait and the personal group logic into UnixClusterGroupsTable - Reuse core helpers (IdentifiersTable::lookupForPerson()/lookupGroup(), Validation::naturalNumber()) and plain saveOrFail(); add isMapped(), mappedGroupIds(), isInUse() and findForCluster() to remove repeated queries - Drop the plugin's same-CO rules, already enforced by core GMR-2 - Add locale strings for assignment errors, account statuses and history Core: - Cluster Status page no longer shows a Clusters index breadcrumb
UnixCluster plugin (app/availableplugins/UnixCluster): - UnixClustersTable::status(): NotCreated without Accounts, Active if any Account is Active/Grace Period, Locked if any is Suspended, otherwise Expired; the comment lists each username with its status - UnixClustersTable::marshalProvisioningData(): Active/Grace Period Accounts with their Primary Group, plus the usable mapped Groups the Person is a member of - assign() requests Person provisioning after commit - manage action redirects to the Person's Unix Cluster Accounts - New UnixClusterAccountsController and templates: per-Person index with username/UID notes when they differ from the Person's Identifiers, Primary Group with its GID, read-only Person, shell and sync mode defaulted from the cluster - Account changes provision the owning Person - Add an Accounts tab to the cluster pages; personal Groups link to their Person's Accounts - Unix Cluster Groups index: readable name note with clearer wording - Locale strings for the Accounts UI Core: - Clusters/fields.inc adds one tab per cluster plugin child model, so the Properties tab shows all plugin tabs
…184) UnixCluster plugin (app/availableplugins/UnixCluster): - Record Person history for added, edited and deleted Unix Cluster Accounts in UnixClusterAccountsTable::localAfterSave(); assign() passes its own comment through the historyComment save option, so each Account change writes exactly one history record - New "Delete with Personal Group" action (deleteWithGroup, POST only): deletes the Account together with its Primary Group, but only when that Group is the same Person's Personal Unix Cluster Group and no other Account uses it; the mapping cascades, and the Person and Group are provisioned afterwards - Allow the Unix Cluster primary link of deleteWithGroup to be looked up from the Account ID - Add search() to UnixClusterAccountsTable (username, GECOS, UID) and UnixClusterGroupsTable (CO Group name) - Index filters for Accounts (username, UID, GECOS, shell, home directory, status, sync mode, validity) and Unix Cluster Groups (origin, plus a CO Group select limited to the Groups mapped to the cluster); hide unix_cluster_id and primary_group_id from the filters - Remove the 'standard' subnavigation from the Account and Unix Cluster Group forms, which failed for non-pluggable models - Locale strings for history, the delete action and the filters
UnixCluster plugin (app/availableplugins/UnixCluster): - New UnixClusterListener (registered in UnixClusterPlugin::bootstrap()): when a Person's Identifier or Primary Name is saved, Accounts with Sync Mode "Track CO Person Attributes" get updated GECOS, UID, username and home directory (suspended Accounts included) - Personal Groups follow the sync: their GID and Group Name Identifiers, name and description are updated only where they still equal the old value. Conflicts are checked first; a conflicting update writes nothing and is recorded in the Person's history - When a Person's status changes, their mapped Unix Cluster Groups are reprovisioned - marshalProvisioningData() adds scope, cluster_id and gid_number to Accounts, and scope, cluster_id, group_name and gid_number to Unix Cluster Groups - New opt-in hook marshalGroupProvisioningData() returns a mapped, usable Group with member_uids. Only valid members whose Person is Active or in Grace Period are included - Reprovision the Person's mapped Groups after assign(), Account changes and username sync, so memberUid stays current - Locale strings for sync errors and history LdapConnector (app/plugins/LdapConnector): - Register PosixAccountSchemas, PosixGroupSchemas, VoPosixAccountSchemas and VoPosixGroupSchemas as ldap_schema types - New PosixSchemaTrait used by the four Posix schema tables; without Unix data, add emits nothing and modify clears the schema's attributes - Optional cluster_id on posix_account_schemas and posix_group_schemas to choose which Unix Cluster feeds posixAccount/posixGroup; referenced Clusters are protected via LdapProvisionersTable::hasManyPlugins - TODO to switch to matching-rule de-duplication once PR-476 is merged Core: - GroupsTable::marshalProvisioningData() asks active Cluster plugins for Group provisioning data through marshalGroupProvisioningData()
UnixCluster plugin (app/availableplugins/UnixCluster): - Example returns for UnixClustersTable::marshalProvisioningData() (Accounts with primary_group, cluster_id, scope, gid_number; Unix Cluster Groups with group, cluster_id, scope, group_name, gid_number) and marshalGroupProvisioningData() (adds member_uids) LdapConnector (app/plugins/LdapConnector): - PosixSchemaTrait documents the unix_cluster_accounts and unix_cluster_groups input, with the LDAP attribute each field feeds - Replace the placeholder output examples of the posixAccount, posixGroup, voPosixAccount and voPosixGroup schemas with examples that match the code: multi-valued uid/cn, the personal Group cn, scoped and unscoped voPosix values, and the attribute clearing on modify/rename Core: - PeopleTable and GroupsTable marshalProvisioningData() examples show the data injected by Cluster plugins (unix_cluster_accounts, unix_cluster_groups) No functional changes.
…e username width to 128 (CFM-184)
Sign in
to join this conversation on GitHub.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.